﻿    <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="kart.aspx.cs" Inherits="Loja.orders.kart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="../scripts/colorbox/jquery.colorbox-min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../scripts/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/jquery-ui-1.8.16.custom/css/custom-theme/jquery-ui-1.8.16.custom.css" />
    <link href="../css/site.css" rel="stylesheet" type="text/css" />
    <style>
        #tabela_kart th
        {
            background-color: #8B4513;
        }
        .botoes
        {
            margin-right: 45px;
            margin-left: 30px;
            margin-bottom: 20px;
            width: 840px;
            text-align: right;
            margin-top: 20px;
        }
        .menos
        {
            width: 20px;
            height: 15px;
            margin-bottom: -3px;
        }
        .mais
        {
            width: 20px;
            height: 15px;
            margin-bottom: -3px;
        }
        .calcular
        {
            width: 20px;
            height: 15px;
            margin-bottom: -3px;
            margin-left: 10px;
        }
        .QtdField
        {
            width: 20px;
        }
        a.remover:hover
        {
            text-decoration: underline;
        }
        a.remover
        {
            font-size: 11px;
            padding-top: 10px;
            font-weight:normal;
        }
        img.img_Produto
        {
            width: 100px;
            height: 110px;
            -moz-box-shadow: -5px -5px 5px #888;
            -webkit-box-shadow: -5px -5px 5px #888;
            box-shadow: -5px -5px 5px #888;
            text-decoration: none;
            border: 0px;
        }
       
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div class="progresso">
        <ul class="steps">
            <li id="liCarrinho" class="progress"><span>Minha Cesta</span></li>
            <li id="liIdent" ><span>Identificação</span></li>
            <li id="liEntrega"><span style="">Entrega</span></li>
            <li id="liPagamento"><span>Pagamento</span></li>
            <li id="liConfirmacao" class="last"><span>Confirmação</span></li>
        </ul>
    </div>
    
    <div class="botoes" style="position:relative;clear:both; margin-top: 120px;">
        <asp:LinkButton ID="btnBackShop" CssClass="voltar" runat="server" OnClick="btnBackShop_Click">Voltar às compras</asp:LinkButton>
        <asp:LinkButton ID="btnEndShop" CssClass="finalizar" runat="server" 
            onclick="btnEndShop_Click">Finalizar compra</asp:LinkButton>
    </div>
    <asp:UpdatePanel ID="upDados" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="rptCarrinho" EventName="ItemCommand" />
        </Triggers>
        <ContentTemplate>
            <div id="produtos">
                <table id="tabela_kart">
                    <thead>
                        <tr>
                            <th class="roundLeft" style="width: 300px">
                                Produto
                            </th>
                            <th style="width: 150px">
                                Qtde.
                            </th>
                            <th style="width: 195px">
                                Valor Unitário
                            </th>
                            <th class="roundRight" style="width: 195px">
                                Total
                            </th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <td colspan="2">
                               
                            </td>
                            <td >
                                <strong>Valor Total</strong>
                            </td>
                            <td>
                                <strong><asp:Label ID="lblTotPed" runat=server Text="0"></asp:Label></strong>
                            </td>
                        </tr>
                    </tfoot>
                    <tbody>
                        <asp:Repeater ID="rptCarrinho" runat="server" OnItemCommand="rptCarrinho_ItemCommand"
                            OnItemDataBound="rptCarrinho_ItemDataBound">
                            <ItemTemplate>
                                <tr>
                                    <td >
                                        <asp:HiddenField ID="hdProduto" runat="server" />
                                        <asp:HiddenField ID="hdPeso" runat="server" />
                                        <asp:Image ID="imgProduto" runat="server" CssClass="img_Produto" />
                                        <br />
                                        <asp:Label ID="lblDescicao" runat="server" Text="Label"></asp:Label>
                                        <br />
                                        <strong>
                                            <asp:Label ID="lblPeso" runat="server" Text="Label"></asp:Label></strong>
                                        <br />
                                        <asp:LinkButton ID="btnRemover" runat="server" CommandName="exlcuir" CssClass="remover">Remover</asp:LinkButton>
                                    </td>
                                    <td >
                                        <asp:LinkButton ID="btnMenos" runat="server" CommandName="menos" CssClass="menos"></asp:LinkButton>
                                        <asp:TextBox ID="txtQtde" runat="server" MaxLength="3" Text="" CssClass="QtdField"></asp:TextBox>
                                        <asp:LinkButton ID="btnMais" runat="server" CommandName="mais" CssClass="mais"></asp:LinkButton>
                                        <asp:LinkButton ID="btnRecalc" runat="server" CommandName="recalcular" CssClass="calcular"
                                            ToolTip="Calcular valor"></asp:LinkButton>
                                    </td>
                                    <td >
                                        <asp:Label ID="lblValUni" runat="server" Text=""></asp:Label>
                                    </td>
                                    <td >
                                        <asp:Label ID="lblValTot" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div class="botoes">
        <asp:LinkButton ID="btnBackShop2" CssClass="voltar" runat="server" OnClick="btnBackShop_Click">Voltar às compras</asp:LinkButton>
        <asp:LinkButton ID="btnEndShop2" CssClass="finalizar" runat="server" 
            onclick="btnEndShop_Click">Finalizar compra</asp:LinkButton>
    </div>
</asp:Content>